﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Douban.Api.Infrastructure
{
    public class EntityAttribute : ElementAttribute
    {
        private readonly string _name;

        public EntityAttribute(string name) : base("entity", NsManager.Douban)
        {
            _name = name;
        }

        public override string GetXPath(System.Xml.XmlNamespaceManager nsManager)
        {
            return base.GetXPath(nsManager) + string.Format("[@name='{0}']", _name);
        }
    }
}
